<template>
  <div class="chinaMap">
    <cheader :pageIndex="1"></cheader>
    <div class="banner" :style="{backgroundImage: 'url('+ bg +')'}">
      <div class="content">
        <div class="p1-title">
          <div class="tWrap">
            <div class="t">
              <!-- <img src="@/common/img/ball1.png" alt=""> -->
              <img src="@/common/img/ball2.png" alt="">
              <!-- <img :src="'../../common/img/common/ball'+ (parseInt(project)+1) +'.png'" alt=""> -->
              <h2>“桃李不言，大爱交大”</h2>
              <i></i>
            </div>
          </div>
          <div class="bWrap">
            <div class="b">
              <h3></h3>
              <i></i>
            </div>
          </div>
        </div>
        <span class="goProject" @click="goProject">返回专题页 ></span>
      </div>
    </div>
    <div class="map">
      <img src="./banner.jpg" alt="" class="title">
      <img src="./china.png" alt="" class="title">
      <button @click="goDetail">
        <font-awesome-icon icon="video" class="icon"/>
        <span>观看爱心捐赠的具体情况</span>
      </button>
    </div>
    <cfooter></cfooter>
  </div>
</template>
<script>
import cheader from '@/components/cheader/cheader'
import cfooter from '@/components/cfooter/cfooter'
import api from '@/common/js/api'
export default {
  data () {
    return {
      bg: require('@/common/img/bg.png'),
      did: ''
    }
  },
  created () {
    api.getChinaId().then(res => {
      if (res.data.result === '0') {
        this.did = res.data.data.id
        console.log(this.did)
      }
    })
  },
  methods: {
    goProject () {
      this.$router.push({
        name: 'project2'
      })
    },
    goDetail () {
      this.$router.push({
        name: 'projectDetail',
        query: {
          project: 1,
          blc: 0,
          did: this.did
        }
      })
    }
  },
  components: {
    cheader,
    cfooter
  }
}
</script>
<style lang="scss" scoped>
  .chinaMap {
    .banner {
      height: 278px;
      background: center center no-repeat;
      background-color: #d2964f;
      width: 100%;
      .content {
        // background: #ccc;
        width: 1100px;
        height: 100%;
        margin: 0 auto;
        position: relative;
        .p1-title {
          position: absolute;
          left: 47px;
          bottom: 40px;
          .t {
            height: 50px;
            position: relative;
            display: inline-block;
            img {
              position: absolute;
              left: 0;
              top: 0;
            }
            h2 {
              font-size: 28px;
              color: #fff;
              position: relative;
              top: 16px;
              margin-left: 5px;
              font-weight: bold;
            }
            i {
              width: 6px;
              height: 6px;
              position: absolute;
              right: -3px;
              bottom: 4px;
              background-color: #ffe75f;
            }
          }
          .b {
            margin-top: 20px;
            display: flex;
            justify-content: space-between;
            position: relative;
            h3 {
              font-size: 20px;
              color: #fff;
              position: relative;
              z-index: 3;
            }
            i {
              color: #fff;
              font-size: 20px;
              font-style: normal;
              cursor: pointer;
            }
          }
        }
        .goProject {
          cursor: pointer;
          height: 20px;
          line-height: 20px;
          // background-color: red;
          color: #fff;
          position: absolute;
          bottom: 49px;
          right: 12px;
        }
      }
    }
    .map {
      height: 815px;
      width: 900px;
      // background-color: #ccc;
      margin: 0 auto;
      .title {
        display: block;
        margin: 33px auto;
      }
      .china {
        display: block;
        margin: 0 auto;
      }
      button {
        width: 544px;
        height: 50px;
        border: 0 none;
        background-color: #e8e8e8;
        display: block;
        margin: 0 auto;
        border-radius: 10px;
        cursor: pointer;
        .icon {
          display: inline-block;
          vertical-align: top;
          font-size: 16px;
          margin-top: 6px;
          margin-right: 10px;
        }
        span {
          font-size: 20px;
          color: #606060;
          font-weight: bold;
        }
      }
    }
    .cfooter {
      background-color: #e5e5e5;
      color: #595959 !important;
    }
  }
</style>
